package com.xinqi.modules.sys.dict.convert;

import com.xinqi.common.mapstruct.CommonConvertConfig;
import com.xinqi.modules.sys.dict.domain.DictSubjectEntity;
import com.xinqi.modules.sys.dict.dto.req.DictSubjectCreateDTO;
import com.xinqi.modules.sys.dict.dto.req.DictSubjectUpdateDTO;
import com.xinqi.modules.sys.dict.dto.rsp.DictSubjectResultDTO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

import java.util.List;

/**
 * 字典-学科转换
 *
 * @author: linkai
 * @date: 2023/05/03
 */
@Mapper(config = CommonConvertConfig.class)
public abstract class DictSubjectConvert {
    public abstract DictSubjectEntity create(DictSubjectCreateDTO s);

    public abstract DictSubjectEntity update(DictSubjectUpdateDTO s, @MappingTarget DictSubjectEntity t);

    public abstract DictSubjectEntity update(DictSubjectUpdateDTO s);

    public abstract DictSubjectResultDTO convert(DictSubjectEntity s);

    public abstract List<DictSubjectResultDTO> convert(List<DictSubjectEntity> s);

}
